package com.group_g.hkr;

import java.awt.Font;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class Product extends JPanel {
	
	public Product(int id1, String name1, String price1, String company1, String amount1, String image1,
			int x,int y, int width, int height){
		this.setLayout(null);
		this.setBounds(x, y, width, height);
		
		Font font = new Font("Sherif", Font.BOLD, 14);
		
		JLabel image2 = new JLabel();
		image2.setBounds(0, 0, 50, 50);
		ImageIcon image = new ImageIcon(image1);
		image2.setIcon(image);
		this.add(image2);
		
//		JLabel idLabel = new JLabel();
//		String label = ""+id1;
//		idLabel.setText(label);
//		idLabel.setBounds(0, 0, 10, 50);
//		this.add(idLabel);
		
		JLabel name2 = new JLabel();
		name2.setText(name1);
		name2.setBounds(70, 0, 50, 50);
		name2.setFont(font);
		this.add(name2);
		
		JLabel price2 = new JLabel();
		String label1 = price1;
		price2.setText(label1);
		price2.setBounds(120, 0, 50, 50);
		price2.setFont(font);
		this.add(price2);
		
		JLabel company2 = new JLabel();
		company2.setText(company1);
		company2.setBounds(190, 0, 100, 50);
		company2.setFont(font);
		this.add(company2);
		
		JLabel amount2 = new JLabel();
		String label3 = amount1;
		amount2.setText(label3);
		amount2.setBounds(290, 0, 30, 50);
		amount2.setFont(font);
		this.add(amount2);
		
	}
}
